<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core">
	<f:view>
		<ui:composition template="/template/templatePadrao.xhtml"> 
			<ui:define name="body">
			
				<h:form id="form">
					<p:growl id="growl" />
					<h:panelGroup id="list_hospedagem" rendered="#{!hospedagemManager.showPanelCadastro}">
						<h:outputText value="Hospedagem > Disponibilidade" styleClass="breadcrumb"/> <br /><br />
						<ui:include src="/veterinaria/paginas/hotelaria/listHotelaria.xhtml"></ui:include>
					</h:panelGroup>
			    </h:form>
			    
			    <p:dialog header="Hospedar Cliente" position="center" widgetVar="dlg_alocar_unidade" modal="true" width="800" height="500" resizable="false">
			    	<h:form id="form_hospedar">
			    		<ui:include src="/veterinaria/paginas/hotelaria/hospedagem.xhtml" />
			    	</h:form>
			    </p:dialog>
			    
			    
			    <p:dialog header="Liberar Unidade" position="center" widgetVar="dlg_liberar_unidade" modal="true" width="800" height="500" resizable="false">
			    	<h:form id="form_liberar_hospedagem">
			    		<ui:include src="/veterinaria/paginas/hotelaria/liberarHospedagem.xhtml" />
			    	</h:form>
			    </p:dialog>
			    
			    
			    
			    <p:dialog header="Clientes" widgetVar="dlg_cliente" modal="true">
			    	<h:form id="form_cliente">
				    	<p:dataTable value="#{clienteManager.clientes}" var="cliente" rows="3" paginator="true" paginatorPosition="top">
							<p:column headerText="Cliente">
								<h:outputText value="#{cliente.pessoa.displayNome}" />
							</p:column>
							<p:column headerText="CPF">
								<h:outputText value="#{cliente.pessoa.displayDocumento}" />
							</p:column>
							<p:column headerText="Ação">
								<p:commandButton action="#{hospedagemManager.searchClientes}" value="Pet's" process="@this" update=":form_hospedar" oncomplete="dlg_cliente.hide();">
									<f:setPropertyActionListener target="#{clienteManager.cliente}" value="#{cliente}" />
								</p:commandButton>
							</p:column>
						
						</p:dataTable>
					</h:form>
			    
			    </p:dialog>
			    
			</ui:define>
		</ui:composition>
	</f:view>
</html>